package com.emagic.manage.modules.room.domain;

import com.emagic.manage.LifeApplication;
import com.emagic.manage.data.entities.response.Empty;
import com.emagic.manage.data.repository.Repository;
import com.emagic.manage.mvp.domain.UseCase;

import java.util.Map;

import javax.inject.Inject;

import rx.Observable;

/**
 * Created by xiatian on 2017/12/4.
 */

public class GetOutSendGiftUseCase extends UseCase<Empty> {

    private Repository mRepository;
    private Map studios;
    private String serial;

    public void setSerial(String serial) {
        this.serial = serial;
    }

    public void setStudios(Map studios) {
        this.studios = studios;
    }

    @Inject
    public GetOutSendGiftUseCase(Repository repository) {
        this.mRepository = repository;
    }

    @Override
    protected Observable<Empty> buildObservable() {
        return mRepository.sendgift(serial, LifeApplication.getInstance().getCurrentUser().getUserid(),
                LifeApplication.getInstance().getCurrentUser().getAccount(), studios);
    }
}
